<?php
/**
 * Created by xuan.
 * Author: xuan
 * Date: 2018/8/3
 * Time: 18:24
 */

namespace app\api\model;
use think\Db;

class Area extends BaseModel
{	
	protected $table = 'area';
	
	public static function selectProvince(){
		$lists = model("Area")->where(array("level"=>1))->select();
		return $lists;
	}
	
	public static function selectCity($id){
		$lists = model("Area")->where(array("parent_code_id"=>$id))->select();
		return $lists;
	}
	
	public static function selectArea($id){
		$lists = model("Area")->where(array("parent_code_id"=>$id))->select();
		return $lists;
	}
    
    
}